/*
 * Copyright 2020 HPB Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.hpb.bc.entity;

public class BlockBigRecord extends BaseEntity {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column block_big_record.block_number
     *
     * @mbg.generated
     */
    private Long blockNumber;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column block_big_record.block_hash
     *
     * @mbg.generated
     */
    private String blockHash;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column block_big_record.tx_count
     *
     * @mbg.generated
     */
    private Long txCount;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column block_big_record.block_info_json_str
     *
     * @mbg.generated
     */
    private String blockInfoJsonStr;

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column block_big_record.block_number
     *
     * @return the value of block_big_record.block_number
     * @mbg.generated
     */
    public Long getBlockNumber() {
        return blockNumber;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column block_big_record.block_number
     *
     * @param blockNumber the value for block_big_record.block_number
     * @mbg.generated
     */
    public void setBlockNumber(Long blockNumber) {
        this.blockNumber = blockNumber;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column block_big_record.block_hash
     *
     * @return the value of block_big_record.block_hash
     * @mbg.generated
     */
    public String getBlockHash() {
        return blockHash;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column block_big_record.block_hash
     *
     * @param blockHash the value for block_big_record.block_hash
     * @mbg.generated
     */
    public void setBlockHash(String blockHash) {
        this.blockHash = blockHash == null ? null : blockHash.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column block_big_record.tx_count
     *
     * @return the value of block_big_record.tx_count
     * @mbg.generated
     */
    public Long getTxCount() {
        return txCount;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column block_big_record.tx_count
     *
     * @param txCount the value for block_big_record.tx_count
     * @mbg.generated
     */
    public void setTxCount(Long txCount) {
        this.txCount = txCount;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column block_big_record.block_info_json_str
     *
     * @return the value of block_big_record.block_info_json_str
     * @mbg.generated
     */
    public String getBlockInfoJsonStr() {
        return blockInfoJsonStr;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column block_big_record.block_info_json_str
     *
     * @param blockInfoJsonStr the value for block_big_record.block_info_json_str
     * @mbg.generated
     */
    public void setBlockInfoJsonStr(String blockInfoJsonStr) {
        this.blockInfoJsonStr = blockInfoJsonStr == null ? null : blockInfoJsonStr.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table block_big_record
     *
     * @mbg.generated
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        BlockBigRecord other = (BlockBigRecord) that;
        return (this.getBlockNumber() == null ? other.getBlockNumber() == null : this.getBlockNumber().equals(other.getBlockNumber()))
                && (this.getBlockHash() == null ? other.getBlockHash() == null : this.getBlockHash().equals(other.getBlockHash()))
                && (this.getTxCount() == null ? other.getTxCount() == null : this.getTxCount().equals(other.getTxCount()))
                && (this.getBlockInfoJsonStr() == null ? other.getBlockInfoJsonStr() == null : this.getBlockInfoJsonStr().equals(other.getBlockInfoJsonStr()));
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table block_big_record
     *
     * @mbg.generated
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getBlockNumber() == null) ? 0 : getBlockNumber().hashCode());
        result = prime * result + ((getBlockHash() == null) ? 0 : getBlockHash().hashCode());
        result = prime * result + ((getTxCount() == null) ? 0 : getTxCount().hashCode());
        result = prime * result + ((getBlockInfoJsonStr() == null) ? 0 : getBlockInfoJsonStr().hashCode());
        return result;
    }
}